package com.android.panballgame;

import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.Window;
import android.view.WindowManager;
import android.os.Handler;
import android.content.Intent;

public class PanBallMainActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
		setContentView(R.layout.splashscreen);
		
		new Handler().postDelayed(new Thread() {
			@Override
			public void run(){
				Intent mainMenu = new Intent(PanBallMainActivity.this, PBMainMenu.class);
				PanBallMainActivity.this.startActivity(mainMenu);
				PanBallMainActivity.this.finish();
				overridePendingTransition(R.layout.fadein, R.layout.fadeout);
			}
		}, PBEngine.GAME_THREAD_DELAY);
		
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		getMenuInflater().inflate(R.menu.pan_ball_main, menu);
		return true;
	}

}
